package question.T0215_1_Clipboard.command;

import java.time.LocalDateTime;

public abstract class Command {
    private static int idCounter = 0;
    protected final int id;

    public Command() {
        this.id = ++idCounter;
    }

    public abstract void execute();

    // 获取命令id，id 可以用于唯一地标识一条命令记录。
    public int getId() {
        return id;
    }

    public static void resetId() {
        idCounter = 0;
    }
}
